/**
 * Copyright (C) 2008 GeoScheduler Team, as stated on <http://www.geoscheduler.org/authors>.
 * 
 * This file is part of GeoScheduler.
 * 
 * GeoScheduler is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * GeoScheduler is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with GeoScheduler. If not, see <http://www.gnu.org/licenses/>.
 */

package org.geoscheduler.model.dto;

import org.geoscheduler.commons.marshaller.JSONField;
import org.geoscheduler.model.Tag;

/**
 * 
 * <h2>TagQueryDTO</h2>
 * <p>
 * Transfer object for tag queries.
 * </p>
 * 
 * @author lko
 */
public class TagQueryDTO {

	public static class Result {

		private Tag tag;
		private int count;

		public Result() {
			super();
		}

		public Result(Tag tag, int occurences) {
			super();
			this.count = occurences;
			this.tag = tag;
		}

		@JSONField
		public Tag getTag() {
			return tag;
		}

		public void setTag(Tag tag) {
			this.tag = tag;
		}

		@JSONField
		public int getCount() {
			return count;
		}

		public void setCount(int count) {
			this.count = count;
		}
	}

	private int offset;
	private int maxResults;
	private String tagLike;
	private String tagName;
	private String country;

	public TagQueryDTO() {
		super();
	}

	public TagQueryDTO(String country, String tagLike, String tagName, int maxResults, int offset) {
		super();
		this.country = country;
		this.tagLike = tagLike;
		this.maxResults = maxResults;
		this.offset = offset;
		this.tagName = tagName;
	}

	@JSONField
	public int getOffset() {
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = offset;
	}

	@JSONField(defaultValue = "1000")
	public int getMaxResults() {
		return maxResults;
	}

	public void setMaxResults(int maxResults) {
		this.maxResults = maxResults;
	}

	@JSONField
	public String getTagName() {
		return tagName;
	}

	public void setTagName(String tagName) {
		this.tagName = tagName;
	}

	@JSONField
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@JSONField
	public String getTagLike() {
		return tagLike;
	}

	public void setTagLike(String tagLike) {
		this.tagLike = tagLike;
	}

}
